import { request } from './request'

//获取所有用户
export function getAllUserName() {
    return request({
        url: '/user/allUser',
        params: {

        }
    })
}
//注册用户
export function setUser(userMessage) {
    return request({
        url: '/user/registerPhone',
        method: 'post',
        data: userMessage
    })
}
//用户登录
export function userLogin(userMessage) {
    return request({
        url: '/user/loginPhone',
        method: 'post',
        data: userMessage
    })
}

//获取用户信息
export function getUserInfo(uid) {
    return request({
        url: `/userInfo/getUserInfo/${uid}`,
        method: 'get',
        data: uid
    })
}

//修改用户信息
export function updateUserInfo(userInfo) {
    return request({
        url: "/userInfo/updateUserInfo/",
        method: 'post',
        headers: {
            'Content-Type': 'application/json',//设置请求头请求格式为JSON
        },
        data: userInfo
    })
}